﻿/*----------------------------------------------------------------------------------------
*
*  Copyright 2019, Gao Hai Hui, <fromzeropoint@126.com>.  All rights reserved.
*  https://gitee.com/helloworldghh/xoskit.git
*  Use of this source code is governed by a MIT license
*  that can be found in the License file.
*
----------------------------------------------------------------------------------------*/
#ifndef __37F9D32B_31F4_455b_BEDD_5E9BE1EF8F71__
#define __37F9D32B_31F4_455b_BEDD_5E9BE1EF8F71__

namespace xos_aio
{

    class aio_mgr : public i_aio_mgr
    {
    public:
        typedef xos::release_impl< aio_mgr > T;

    public:
        aio_mgr();
        ~aio_mgr();

    public:
        // 
        // set callback thread. all aios use ONE callback thread.
        // 
        int set_callback_thread( xos_box::i_callback * pCallbackThread );
        int create( i_aio ** ppv );

    public:
        int put_back_to_pool( T * pT, bool bLock );
        int init();
        int term();

    };

} // xos_aio

#endif // __37F9D32B_31F4_455b_BEDD_5E9BE1EF8F71__
